import requests,time
from bs4 import BeautifulSoup
url = 'http://wx.58.com/pingbandiannao/33815247609917x.shtml?adtype=1&PGTID=0d305a36-0000-15f5-7c4e-2f96e80b5966&entinfo=33815247609917_0&psid=123819056199815891131759848&iuType=_undefined&ClickID=5'
headers = {
    'Cookie' : 'BAIDUID=B0E30EFF7FE97E7C13B868CAC2F999E7:FG=1; BIDUPSID=B0E30EFF7FE97E7C13B868CAC2F999E7; PSTM=1520244999; BDUSS=UJsemZVSTgtMnBOdzVzUWgzUHkxeGw0ZHNBWUpGVGpDV2p5TlZPQ3RLUFZydHhhQVFBQUFBJCQAAAAAAAAAAAEAAAC9J5emv~HU87XEwM-zsgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANUhtVrVIbVaV; BDORZ=B490B5EBF6F3CD402E515D22BCDA1598; cflag=15%3A3; H_PS_PSSID=1440_21088; BDRCVFR[feWj1Vr5u3D]=I67x6TjHwwYf0; PSINO=7',
    'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36'
}
web_data = requests.get(url,headers=headers)
soup = BeautifulSoup(web_data.text,'lxml')
kind = soup.select('header#header > div.f12 > span.crb_i > a')
title = soup.select('div.col_sub > h1')
time = soup.select('li.time')
price = soup.select('span.price')
img = soup.select('div.g_img > span > img')
color = soup.select('ul.suUl > li:nth-of-type(2) > div.su_con > span')
view = soup.select('li.count > em')
print(color)
for kind,title,time,price,img,color,view in zip(kind,title,time,price,img,color,view):
    data = {
        'kind':kind.get_text(),
        'time':time.get_text(),
        'img' : img.get('src'),
        'color': list(color.stripped_strings),
        'view' : view.get_text()
    }
print(data)
